﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WebGioiThieu.Models;

namespace WebGioiThieu.Controllers
{ 
    public class MenuTypeController : Controller
    {
        private IntroductionWebDBEntities db = new IntroductionWebDBEntities();

        //
        // GET: /MenuType/
        
        public ViewResult Index()
        {
            return View(db.MenuTypes.ToList());
        }

        //tạo partial view ở front-end
       
        [ChildActionOnly]
        public ActionResult ViewMenuTypefrontEnd()
        {
            return PartialView(db.MenuTypes.ToList());
        }
        //

        protected override void Dispose(bool disposing)
        {
            db.Dispose();
            base.Dispose(disposing);
        }
    }
}